package com.jingbo.servlet;

import com.jingbo.DAO.Record.pecordimpl;
import com.jingbo.entity.Profile;
import com.jingbo.service.record.recordimpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author jiangjingbo
 * @version V1.0
 * @Project java2203
 * @Package com.jingbo.servlet
 * @Description:
 * @Date 2022/5/27 16:09
 */
@WebServlet("/allone")
public class allOneProfile extends  BeanServlet{
    public String allone(HttpServletRequest request , HttpServletResponse response){
        String id = request.getParameter("id");
            recordimpl recordimpl = new recordimpl(new pecordimpl());
            Profile allone = recordimpl.allone(Integer.parseInt(id));
            if(allone!=null){
                request.setAttribute("allone", allone);
                return "forward:/allone.jsp";
            }else{
                return "redirect:/selectAdd.jsp";
        }
    }
}
